<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BUtil
 *
 * @author ID59C
 */
class BUtil {

//put your code here
    static function arraysEqual($arr1, $arr2) {
        if (count($arr1) != count($arr2)) {
            return(FALSE);
        } else {
            $arrStr1 = serialize($arr1);
            $arrStr2 = serialize($arr2);
            if (strcmp($arrStr1, $arrStr2) == 0) {
                return(TRUE);
            } else {
                return(FALSE);
            }
        }
    }

    static function getRecursiveArrayKeys($array, &$result=array()) {
        
        $values = array_values($array);
        $keys = array_keys($array);        
        $result = array_merge($result, $keys);

        foreach ($values as $value) {
            if (is_array($value)) {
                self::getRecursiveArrayKeys($value,$result);
            }
        }
        
        return $result;
    }

}

?>
